package top.arryweb.application.controller;


import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;
import top.arryweb.application.common.constant.Result;
import top.arryweb.application.common.constant.StatusCode;
import top.arryweb.application.domain.dto.CreateCapitalBlotterDTO;
import top.arryweb.application.service.IBookKeepCapitalBlotterService;

/**
 * <p>
 * 资金流水表 前端控制器
 * </p>
 *
 * @author Mac
 * @since 2021-05-28
 */
@Api(tags = "资金流水")
@RestController
@RequestMapping("/book-keep-capital-blotter")
public class BookKeepCapitalBlotterController {
  @Autowired
  IBookKeepCapitalBlotterService capitalBlotterService;

  @ApiOperation(value = "获取资金流水ID")
  @PostMapping("/getCapitalBlotterId")
  Result<Long> getCapitalBlotterId(CreateCapitalBlotterDTO dto){
    Long capitalBlotterId = capitalBlotterService.getCapitalBlotterId(dto);
    return new Result<>(true, StatusCode.CODE_SUCCESS, "成功获取资金流水ID", capitalBlotterId);
  }
}
